package com.wench.design.principles.dependence_inversion.after;

/**
 * @author wench
 */
public class ComputerDemo {

    public static void main(String[] args) {
        HardDisk hardDisk = new XiJieHardDisk();
//        Cpu cpu = new IntelCpu();
        Cpu cpu = new AmdCpu();
        Memory memory = new KingstonMemory();
        Computer computer = new Computer();
        computer.setCpu(cpu);
        computer.setMemory(memory);
        computer.setHardDisk(hardDisk);

        computer.run();
    }
}
